import request from '@/utils/request'

// 登录帐号
export function login(username, password) {
  return request({
    url: '/account/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}

// 修改密码
export function passwd(params) {
  return request({
    url: '/account/password',
    method: 'post',
    data: params
  })
}

// 获取帐号信息
export function getInfo() {
  return request({
    url: '/account/info',
    method: 'get'
  })
}

// 注销帐号
export function logout() {
  return request({
    url: '/account/logout',
    method: 'get'
  })
}
